package com.cinc.ebc.mm.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinc.ebc.mm.entity.MmPurchaseOrderDetail;
import com.cinc.ebc.mm.mapper.MmPurchaseOrderDetailMapper;
import com.cinc.ebc.mm.model.MmPurchaseOrderDetailModel;
import com.cinc.ebc.mm.service.IMmPurchaseOrderDetailService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 采购订单明细
 * @Author: jeecg-boot
 * @Date:   2022-03-20
 * @Version: V1.0
 */
@Service
public class MmPurchaseOrderDetailServiceImpl extends ServiceImpl<MmPurchaseOrderDetailMapper, MmPurchaseOrderDetail> implements IMmPurchaseOrderDetailService {
	
	@Autowired
	private MmPurchaseOrderDetailMapper mmPurchaseOrderDetailMapper;
	
	@Override
	public List<MmPurchaseOrderDetailModel> selectByMainId(String mainId) {
		return mmPurchaseOrderDetailMapper.selectByMainId(null, mainId);
	}

	@Override
	public IPage<MmPurchaseOrderDetailModel> selectPageByMainId(Page<MmPurchaseOrderDetailModel> page, String mainId) {
		return page.setRecords(mmPurchaseOrderDetailMapper.selectByMainId(page, mainId));
	}
}
